/**
 * Copyright 2009 Adam Ruggles.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.google.code.sapien.dao;

import java.util.List;

import com.google.code.sapien.dao.jpa.UserJpaDAO;
import com.google.code.sapien.model.User;
import com.google.inject.ImplementedBy;

/**
 * Interface for User Data Access Objects.
 * @author Adam
 * @version $Id: UserDAO.java 26 2009-06-01 05:54:53Z a.ruggles $
 * 
 * Created on Feb 7, 2009 at 6:42:43 PM 
 */
@ImplementedBy(UserJpaDAO.class)
public interface UserDAO extends EntityDAO<User> {
	/**
	 * Returns a {@link com.google.code.sapien.model.User} by email.
	 * @param email The email address.
	 * @return The {@link com.google.code.sapien.model.User} with the email or <code>null</code> if not found. 
	 */
	User getByEmail(String email);
	/**
	 * Returns a {@link com.google.code.sapien.model.User} by username.
	 * @param username The username.
	 * @return The {@link com.google.code.sapien.model.User} with the username or <code>null</code> if not found. 
	 */
	User getByUsername(String username);
	/**
	 * Returns all users.
	 * @return A list of users.
	 */
	List<User> listAll();
}
